#ifndef PARTICULEGENERATOR_H
#define PARTICULEGENERATOR_H

#include "Objet3D.h"

namespace PM3D
{
    class Dispositif;
    class Billboard;

    class ParticuleGenerator : public Objet3D
    {
    public:
        ParticuleGenerator(Dispositif* dispositif, const D3DXVECTOR3& origine, 
            const D3DXVECTOR3& particuleDimenssion,
            const D3DXVECTOR3& velocity, 
            float generationsPerSec, float generationRay, float particuleLifeTime,
            const std::wstring& textureFilename);
        ~ParticuleGenerator();
        virtual PHYSIC::BoundingBox getBoundingBox()
        {return PHYSIC::BoundingBox(); };
        virtual void draw();
        void anime(float dt);

    private:
        D3DXVECTOR3 origine_;
        D3DXVECTOR3 particuleDimenssion_;
        D3DXVECTOR3 velocity_;
        float generationsPerSec_;
        float generationRay_;
        float particuleLifeTime_;
        std::wstring textureFilename_;
        Dispositif* dispositif_;

        std::vector<Billboard*> particule_;
        size_t current_;
    };

} // fin namespace
#endif
